feat(legacy): add --excluded-services option for log forwarding integrations#20
Open
romainneutron wants to merge 2 commits intomainfrom
Open
feat(legacy): add --excluded-services option for log forwarding integrations#20romainneutron wants to merge 2 commits intomainfrom
romainneutron wants to merge 2 commits intomainfrom
Conversation
07bfe8a to
3215205
Compare
…rations Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3215205 to
c1e1401
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in the legacy integration commands for excluding specific services from log forwarding integrations via a new --excluded-services option.
Changes:
- Introduces an
excluded_servicesArrayFieldin the integration form, conditionally available for log-forwarding integration types. - Adds PHPUnit coverage to assert the field exists, is correctly typed, and is restricted to the expected integration types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| legacy/src/Command/Integration/IntegrationCommandBase.php | Adds the new excluded_services field and CLI option wiring via the shared form fields. |
| legacy/tests/Command/Integration/IntegrationCommandBaseTest.php | Adds tests validating the new field’s presence and conditional behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+653
to
+662
| 'excluded_services' => new ArrayField('Excluded services', [ | ||
| 'optionName' => 'excluded-services', | ||
| 'conditions' => ['type' => [ | ||
| 'httplog', | ||
| 'newrelic', | ||
| 'splunk', | ||
| 'sumologic', | ||
| 'syslog', | ||
| 'otlplog', | ||
| ]], |
Comment on lines
+54
to
+63
| $expected = ['httplog', 'newrelic', 'splunk', 'sumologic', 'syslog', 'otlplog']; | ||
| $this->assertSame($expected, $conditions['type']); | ||
| } | ||
|
|
||
| public function testExcludedServicesFieldIncludedForLogForwardingTypes(): void | ||
| { | ||
| $typeField = $this->fields['type']; | ||
| $conditionValues = $this->fields['excluded_services']->getConditions()['type']; | ||
| $logTypes = ['httplog', 'newrelic', 'splunk', 'sumologic', 'syslog', 'otlplog']; | ||
| foreach ($logTypes as $type) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations.